package com.sky.wsp.rabbitmq.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自定义RabbitTemplate配置，使用JSON进行消息序列化、反序列化
 *
 * @author wangshaopeng@talkweb.com.cn
 * @desccription
 * @date 2023/8/1
 */
@Configuration
public class RabbitTemplateConfig {
    @Bean
    public MessageConverter jsonMessageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}
